from UIAutoTest.unittest_login.FindElement import FindElement
import time


# 元素操作层
class ElementHandle(FindElement):
    def __init__(self):
        FindElement.__init__(self)

    def username_h(self, username):
        self.find_username().send_keys(username)
        time.sleep(2)

    def pwd_h(self, pwd):
        self.find_password().send_keys(pwd)
        time.sleep(2)

    def code_h(self, code):
        self.find_verifycode().send_keys(code)
        time.sleep(2)

    def btn_h(self):
        self.find_btn().click()
        time.sleep(2)
